﻿@model Eqwww.Web.Areas.SystemManage.Models.Role.CreateViewModel

@{
    ViewData["Title"] = "Create";
    Layout = "~/Views/Shared/_ManageFormLayout.cshtml";
}

<div class="mdui-container">
    <div class="mdui-row">
        <div class="mdui-col-xs-12">
            <div >
                <div class="">

                    <form id="form1" class="">
                        <div asp-validation-summary="ModelOnly" class="mdui-textfield-error"></div>
                        

                            <div class="mdui-row">


                                <div class="mdui-col-xs-12 mdui-col-md-6">
                                    <div class="mdui-textfield mdui-textfield-floating-label">
                                        <label asp-for="Name" class="mdui-textfield-label"></label>
                                        <input asp-for="Name" class="mdui-textfield-input mdui-color-grey-100" />
                                        <span asp-validation-for="Name" class="mdui-textfield-error"></span>
                                    </div>
                                </div>
                                <div class="mdui-col-xs-12 mdui-col-md-6">

                                    <div class="mdui-textfield mdui-textfield-floating-label">
                                        <label asp-for="ShowName" class="mdui-textfield-label"></label>
                                        <input asp-for="ShowName" class="mdui-textfield-input mdui-color-grey-100" />
                                        <span asp-validation-for="ShowName" class="mdui-textfield-error"></span>
                                    </div>
                                </div>

                                <div class="mdui-col-xs-12 mdui-col-md-6">
                                    <div class="mdui-textfield mdui-textfield-floating-label">
                                        <label asp-for="SortCode" class="mdui-textfield-label"></label>
                                        <input asp-for="SortCode" value="0" class="mdui-textfield-input mdui-color-grey-100" />
                                        <span asp-validation-for="SortCode" class="mdui-textfield-error"></span>
                                    </div>
                                </div>

                                <div class="mdui-col-xs-12 mdui-col-md-6">

                                    <div class="mdui-textfield mdui-textfield-floating-label">
                                        <label asp-for="Description" class="mdui-textfield-label"></label>
                                        <input asp-for="Description" class="mdui-textfield-input mdui-color-grey-100" />
                                        <span asp-validation-for="Description" class="mdui-textfield-error"></span>
                                    </div>
                                </div>





                            </div>

                        
                    </form>


                </div>
            </div>
        </div>
    </div>
</div>



@section Scripts {
    @{await Html.RenderPartialAsync("_ValidationScriptsPartial");}

    <script>
        function submitForm() {
            if (!$("#form1").valid()) {
                return false;
            }
            var postData = $('#form1').formSerialize();
            $.submitForm({
                url: "/SystemManage/Role/Create",
                param: postData,
                success: function () {
                    $.currentWindow().location.reload();
                }
            });

        };
    </script>
}


